/*
 * File:     mainwindow.h
 * Authors:  Dominic Stalder, Thomas Bruederli
 *
 * Definition of the application main window class.
 *
 * This file is part of the Qt-based cross-platform Wii device driver.
 *
 * Copyright (C) 2009-2010, Dominic Stalder & Thomas Bruederli
 * Licensed under the GNU Lesser General Public License (LGPL) as published
 * by the Free Software Foundation at http://www.gnu.org/licenses/lgpl-3.0.txt
 *
 * $Id: mainwindow.h 2 2010-02-15 12:48:56Z roundcube $
 */

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui>
#include "wiideviceconnector.h"

// forward declarations
class BoardWidget;
class ControllerWidget;

/**
 * Qt Application main window class
 */
class MainWindow : public QMainWindow
{
	Q_OBJECT

public:
	MainWindow();

protected:
	void closeEvent(QCloseEvent *event);

private:
	WiiDeviceDriver *wiiboard, *wiicontroller;
	WiiDeviceConnector *connector;
	QMenu *fileMenu, *helpMenu;
	QAction *connectBoardAct, *connectWiimoteAct, *reconnectQtAct, *exitAct, *aboutAct, *aboutQtAct;
	BoardWidget *boardUI;
	ControllerWidget *controllerUI;
	
	void createActions();
	void createMenus();
	void createStatusBar();
	
public slots:
	void about();
	void setStatus(const QString&, int deviceType = 0, int state = 0);
	void connectController();
	void connectBoard();
	void reconnect();
	
};

#endif

